package fhp.hlhj.giantfold.module

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.interfaces.BaseModuleInterface
import fhp.hlhj.giantfold.javaBean.MessageListBean
import fhp.hlhj.giantfold.network.UrlApis

/**
 * Created by Administrator on 2018\2\8 0008.
 */
class MessageListModule {
    interface OnMsgListResp:BaseModuleInterface<MessageListBean>

    fun getMsgList(params: HttpParams,listener:OnMsgListResp){

        UrlApis.getMessageList(params)
                .doOnSubscribe {
                    listener.showLoading()
                }
                .subscribe {
                    data->
                    listener.onResp(data)
                }
    }

}